﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using DOM;
using MOD;

namespace BIZ
{
    /// <summary>
    /// StudentAddCourseBIZ 的摘要说明。
    /// </summary>
    public class StudentAddCourseBIZ
    {
        public StudentAddCourseBIZ()
        {
            //
            // TODO: 在此处添加构造函数逻辑
            //
        }
       
        public DataTable SelectAllCourseFromSection()
        {
            DataTable dt = new DataTable();
            SectionDOM sect = new SectionDOM();
            dt = sect.SelectAll();
            return dt;
        }
        public DataTable SelectAllFromTr()
        {
            DataTable dt = new DataTable();
            SectionDOM sect = new SectionDOM();
            dt = sect.SelectAll();
            return dt;
        }
        public bool AddCourseToTranscriptEntry(string sectionId, string userName)
        {
            bool b = false;
            TranscriptEntryDOM trancscript = new TranscriptEntryDOM();
           
            SectionInfo info = new SectionInfo();
            SectionDOM sect = new SectionDOM();
            List<SectionInfo> sectInfo = new List<SectionInfo>();
            sectInfo = sect.SelectSection(sectionId);
            info = sectInfo[0];
            
            b = trancscript.InsertTranEntry(userName,info);
            return b;
        }
        public DataTable ShowDataTwo()
        {
            DataTable dt = new DataTable();
            TranscriptEntryDOM tr = new TranscriptEntryDOM();
            dt = tr.SelectAll();
            return dt;
        }
        public bool DeleteCoureseFromTranscript(Int32 transcriptEntryId)
        {
            bool b = false;
            TranscriptEntryDOM tr = new TranscriptEntryDOM();
            b = tr.DeleteSection(transcriptEntryId);
            return b;
        }
    }
}